package com.smart.lib.controller;

import com.smart.lib.service.CollegeService;
import com.smart.lib.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学院和专业方向API接口
 * */
@RestController
@CrossOrigin
@RequestMapping("/colleges")
public class CollegeController {
    @Autowired
    CollegeService collegeService;

    /**
     * 查询所有学院及专业方向信息
     * */
    @RequestMapping(value = "/getAllCollegeAndMajors", method = RequestMethod.GET, produces = "application/json; utf-8")
    public Response getAllCollegeAndMajors(){
        return collegeService.getAllCollegeAndMajors();
    }
}
